Skip to content

Avoids retrying on 403s - #123

Closed
emorell96 wants to merge 1 commit into
pubnub:masterfrom
StockDrops:master
Closed

Avoids retrying on 403s#123
emorell96 wants to merge 1 commit into
pubnub:masterfrom
StockDrops:master

Conversation

@emorell96

@emorell96 emorell96 commented Dec 7, 2021

Copy link
Copy Markdown

This pull request is a fix for retrying on 403s. From a consumer perspective retrying on 403s is extremely expensive since Pubnub charges per transaction even if it's a 403. So this fix that issue by checking the pnstatus and only retrying is the status is not AccessDeniedCategory.

If it is access denied category, then it announces it so that the user can implement its own retry logic.

Fixes: #122

@jakub-grzesiowski

Copy link
Copy Markdown
Contributor

We're sorry it took this long to address this PR but by now it's massively outdated and doesn't account for the internal Event Engine implementation. Also, retrying on 403 can be the desired behaviour since the auth token may have to be changed during runtime, and trying to perform a call with a stale one shouldn't terminate the connection. If this is still an issue please contact us again, but for now I'm closing this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The sdk retries in 403s leading to huge billings.

2 participants